myonload=function(myym){
	let xml;
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
			if(xml.responseText!="null"&&xml.responseText!="")
			{
				let t=JSON.parse(xml.responseText).data;
				for(let i=0;i<t.length;i++){
				setmessage(t[i].e_L1InstID,t[i].e_L2InstID,t[i].e_L3InstID,t[i].eName,t[i].eGender,t[i].ePositionName,t[i].eID,myym)
				}
			}

		}
	}
	xml.open("post","/employee/findByeStatus",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send("eSattus=1");
}
setmessage=function(one,tow,third,name,sex,zwmc,eID,myym){
	let maxbox=document.getElementsByClassName('mymainbox')[0];	
	let box1=document.createElement('div');
	box1.className='myemployees';
	let box2=document.createElement('div');
	let box3=document.createElement('div');
	let box4=document.createElement('div');
	let box5=document.createElement('div');
	let box6=document.createElement('div');
	let box7=document.createElement('div');
	let box8=document.createElement('div');
	let box9=document.createElement('div');
	let a=document.createElement('a');
	a.className="nav-link pl-3";
	if(myym=="find"){
	a.href="showem.html?eID="+eID;
	a.innerText="查看";
	}
	let lable=document.createElement("label");
	lable.className="fuhe";
	lable.appendChild(a);
	box2.className='reviewbox1';
	box3.className='reviewbox2';
	box4.className='reviewbox2';
	box5.className='reviewbox2';
	box6.className='reviewbox2';
	box7.className='reviewbox2';
	box8.className='reviewbox2';
	box9.className='reviewbox2';
	box9.appendChild(lable);
	box2.innerText=eID;
	box3.innerText=name;
	box4.innerText=sex;
	box5.innerText=one;
	box6.innerText=tow;
	box7.innerText=third;
	box8.innerText=zwmc;
	box1.appendChild(box2);
	box1.appendChild(box3);
	box1.appendChild(box4);
	box1.appendChild(box5);
	box1.appendChild(box6);
	box1.appendChild(box7);
	box1.appendChild(box8);
	box1.appendChild(box9);
	maxbox.appendChild(box1);
}
myfind=function(){
	    let  input1=document.getElementById('onein');
	    let	 input2=document.getElementById('towin');
	    let	 input3=document.getElementById('thirdin');
		let  input4=document.getElementById('position1');
		let  input5=document.getElementById('position2');
		let	 btime=document.getElementById('btime');
		let  etime=document.getElementById('etime');
		let maxbox=document.getElementsByClassName('mymainbox')[0];	
		let cbox=maxbox.getElementsByClassName('myemployees');
		let l=cbox.length;
		for(let i=0;i<l;i++)
		cbox[0].remove();
		let xml;
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
			if(xml.responseText!="null"&&xml.responseText!="")
			{
				if(JSON.parse(xml.responseText).status==200){
					let t=JSON.parse(xml.responseText).data;
					for(let i=0;i<t.length;i++){
						setmessage(t[i].e_L1InstID,t[i].e_L2InstID,t[i].e_L3InstID,t[i].eName,t[i].eGender,t[i].ePositionName,t[i].eID,'find')
					}
				}else{
					alert("错误");
				}
			}

		}
	}
	xml.open("post","/employee/findlike",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('e_L1InstID='+input1.value+'&e_L2InstID='+input2.value+'&e_L3InstID='+input3.value+
	'&ePositionCategory='+input4.value+'&ePositionName='+input5.value+'&begintime='+btime.value+'&endtime='+etime.value);
}
